#include <string>
#include <iostream>

class EncodeString : public std::string
{
public:
	EncodeString();
	EncodeString(const std::string&);
	EncodeString(const char*);
	
	std::ostream& WriteToStream(std::ostream&, const std::string& encodeThese="") const;
	std::istream& ReadFromStream(std::istream&);
};

inline EncodeString::EncodeString()
{
}

inline EncodeString::EncodeString(const std::string& s)
	:std::string(s)
{
}

inline EncodeString::EncodeString(const char* s)
	:std::string(s)
{
}

inline std::ostream& operator<<(std::ostream& s, EncodeString& e)
{
	return e.WriteToStream(s);
}

inline std::istream& operator>>(std::istream& s, EncodeString& e)
{
	return e.ReadFromStream(s);
}